package net.solvetheriddle.wwclient.view;

import android.content.Context;
import android.util.AttributeSet;
import android.widget.TextView;

public class TimeCashTextView extends TextView {
    
    private double time = 0.0;
    private int money = 0;

    public TimeCashTextView(Context context) {
        super(context);
    }

    public TimeCashTextView(Context context, AttributeSet attrs, int defStyle) {
        super(context, attrs, defStyle);
    }

    public TimeCashTextView(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    public void setTime(double hours) {
        this.time = hours;
        setText(hours + " / " + money);
    }

    public void setMoney(int money) {
        this.money = money;
        setText(time + " / " + money);
    }

    public double getTime() {
        return time;
    }

    public int getMoney() {
        return money;
    }
    
    public void incTime(double hours) {
        setTime(getTime() + hours);
    }
    
    public void incMoney(int howMuch) {
        setMoney(getMoney() + howMuch);
    }
}
